package org.lys.vo;

import java.util.HashMap;
import java.util.Map;

public class UserVO {
	
	private int id;
	private String name;
	
	private Map<String, String> errors= new HashMap<String, String>();
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public boolean validate(){
		if("".equals(name.trim())){
			errors.put("name", "请输入用户名");
		}
		if(errors.size()==0){
			return true;
		}
		return false;
	}
	public Map<String, String> getErrors() {
		return errors;
	}
	public void setErrors(Map<String, String> errors) {
		this.errors = errors;
	}
	
	

}
